<!DOCTYPE html>
<html>
<head>
  <title>代码生成器</title>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"
        name="viewport">
  <link rel="stylesheet" href="css/bootstrap.min.css">
  <link rel="stylesheet" href="css/font-awesome.min.css">
  <link rel="stylesheet" href="plugins/jqgrid/ui.jqgrid-bootstrap.css">
  <link rel="stylesheet" href="css/main.css">
  <link rel="stylesheet" href="css/message.css">
  <script src="libs/jquery.min.js"></script>
  <script src="plugins/layer/layer.js"></script>
  <script src="libs/bootstrap.min.js"></script>
  <script src="libs/vue.min.js"></script>
  <script src="plugins/jqgrid/grid.locale-cn.js"></script>
  <script src="plugins/jqgrid/jquery.jqGrid.min.js"></script>
  <script src="js/common.js"></script>
</head>
<body>
<div id="rrapp">
  <div class="grid-btn">
    <div class="form-group col-sm-2">
      <input type="text" class="form-control" v-model="q.tableName" @keyup.enter="query"
             placeholder="表名">
    </div>
    <a class="btn btn-default" @click="query">查询</a>
    <a class="btn btn-primary" @click="openModal('code')"><i
        class="glyphicon glyphicon-download-alt"></i>&nbsp;下载代码</a>
    <a class="btn btn-primary" @click="openModal('native')"><i class="fa fa-file-code-o"></i>
      生成代码</a>
  </div>
  <table id="jqGrid"></table>
  <div id="jqGridPager"></div>
  <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title">请输入领域</h4>
        </div>
        <div class="modal-body">
          <input type="text" class="form-control" v-model.trim="domain" placeholder="请输入领域(Domain)">
          <div v-if="errorShow&&!domain" style="color:red;padding-left:4px">领域不能为空</div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" @click="closeModal">取消</button>
          <button type="button" class="btn btn-primary" @click="generator">确定</button>
        </div>
      </div>
    </div>
  </div>
  <div class="ant-message" style="display:none">
		<span>
			<div class="ant-message-notice">
				<div class="ant-message-notice-content">
					<div class="ant-message-custom-content ant-message-success">
						<i aria-label="icon: check-circle" class="anticon anticon-check-circle">
							<svg viewBox="64 64 896 896" data-icon="check-circle" width="1em" height="1em"
                   fill="currentColor" aria-hidden="true" focusable="false" class="">
								<path
                    d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 0 1-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z">
								</path>
							</svg>
						</i>
						<span>操作成功</span>
					</div>
				</div>
			</div>
		</span>
  </div>
</div>

<script src="js/generator.js"></script>
</body>
</html>